<template>
  <div class="info">
    <div v-if="props.goodsType === 1" class="mr20"><exam-tag :enum-value="props.goodsInfo.examType" :is-text="false" /></div>
    <div>
      <template v-if="goodsType === 1">
        <nuxt-link :to="{ name: 'exam-detail', query: { id: props.goodsInfo.goodsId ? props.goodsInfo.goodsId : props.goodsInfo.id } }" link plain type="primary">
          <div class="name title">
            <el-tag><common-enum-view :enum-value="props.goodsType" :enum-name="'GoodsType'" /></el-tag>&nbsp;{{ props.goodsInfo.examName }}
          </div>
        </nuxt-link>
      </template>
      <div>支付金额：￥{{ props.goodsInfo.paidAmount ? props.goodsInfo.paidAmount : props.goodsInfo.price }}</div>
    </div>
  </div>
</template>
<script setup>
  const props = defineProps({
    goodsType: { type: Number, default: 0 },
    goodsInfo: { type: Object, default: () => {} }
  })
</script>
<style lang="scss" scoped>
  .info {
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 25px;
    .img {
      height: 75px;
      width: 135px;
      border-radius: 5px;
      margin-right: 20px;
    }
    .text {
      text-align: center;
      place-content: center;
      color: #fff;
    }
    .name {
      flex: 1;
      height: 50px;
      width: 500px;
    }
  }
</style>
